package com.net.oil.user.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.bean.ListDate;
import com.net.oil.user.contract.MyReceiveGoodsContract;
import com.net.oil.user.model.MyReceiveGoodsModel;

/**
 * 作者：lch
 * 时间：2018/10/11 0011:下午 21:17
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class MyReceiveGoodsPresenter extends BasePresenter<MyReceiveGoodsContract.View> implements MyReceiveGoodsContract.Presenter {

    private MyReceiveGoodsContract.View view;
    private MyReceiveGoodsContract.Model model;

    public MyReceiveGoodsPresenter(MyReceiveGoodsContract.View view) {
        this.view = view;
        model = new MyReceiveGoodsModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getMyReceiveGoods(int used, int page, int rows) {
        model.getMyReceiveGoods(used, page, rows);
    }

    @Override
    public void getMyReceiveGoodsSuccess(ListDate myReceiveGoodsBean) {
        view.getMyReceiveGoodsSuccess(myReceiveGoodsBean);
    }

    @Override
    public void getMyReceiveGoodsFailed() {
        view.getMyReceiveGoodsFailed();
    }
}
